<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--框架必需start-->
<script type="text/javascript" src="../js/jquery-1.4.js"></script>
<script type="text/javascript" src="../js/framework.js"></script>
<link href="../css/import_basic.css" rel="stylesheet" type="text/css"/>
<link  rel="stylesheet" type="text/css" id="skin"/>
<!--框架必需end-->

<script>
function clickToQuery(){
	document.forms['queryform'].submit();
}

function skip_amend(index,sId){
    $("#index").val(index);
    $("#sId").val(sId);
    top.Dialog.open({URL:"editStaff!showEditStaffProfie?OpSId="+sId+"&index="+index,Title:"员工信息修改"});
}

function skip_delete(index,sId){
    var index_ = $("#index").val(index);
    var sId1= $("#sId").val(sId);
    top.Dialog.confirm("确定要删除吗",function(){window.location="deleteStaff?OpSId="+sId});
}


$(document).ready(function(){
	var result=<%=request.getParameter("result")%>
	if(result==1)
	{
		alert("删除成功！");
	}
})


</script>
</head>
<body>
	<div class="position">
		<div class="center">
		<div class="left">
		<div class="right">
			<span>当前位置：员工信息管理 >> 员工信息查、删、修</span>
		</div>
		</div>
		</div>
	</div>
	<div class="box2" panelTitle="功能面板" roller="false">
	<form name="queryform" id="queryform"  action="queryStaff" method="post">
		<table>
			<tr>
				<td>部门:</td>
				<td><select id="departmentName" name="departmentName">
					<option value="not">请选择</option>
					<option value="后勤部">后勤部</option>
					<option value="装备部">装备部</option>
					<option value="政治部">政治部</option>
					<option value="武装部">武装部</option>
					<option value="总部">总部</option>
				</select></td>
				<td>性别：</td>
				<td><select id="sex" name="sex">
					<option value="not">请选择</option>
					<option value="男">男</option>
					<option value="女">女</option>
				</select></td>
				<td>员工编号：</td>
				<td><input type="text" id="OpSId" name="OpSId"/></td>
				<td>
				<%--<button><span class="icon_find">查询</span></button>--%>
				<input type="submit" value="查询" onclick="clickToQuery()"/>
				</td>
			</tr>


		</table>
		</form>
	</div>
<div id="scrollContent" class="border_gray">
<form  name="editform" id="editform"  action="queryEditDel" method="post">
 <input type = "hidden" name ="operation" id ="operation"/>
 <input type = "hidden" name ="index" id ="index"/>
 <input type = "hidden" name ="sId" id ="sId"/>
	<table class="tableStyle">
		<tr>
			<th width="10%">姓名</th>
			<th width="5%">性别</th>
			<th width="10%">生日</th>
			<th width="10%">员工编号</th>
			<th width="15%">联系方式</th>
			<th width="10%">邮箱</th>
			<th width="10%">部门</th>
			<th width="15%">家庭地址</th>
			<th width="10%">婚姻状况</th>
			<th width="10%">操作</th>
		</tr>

		 <s:iterator value="staffMPList" status="status">
		             <tr>
		             <s:if test="staffId!='' && staffId!=null">
                        <td><s:property value="lastName" /><s:property value="firstName" /></td>
                        <td><s:property value="sex " /></td>
                        <td><s:date name="birthday" format="yyyy-MM-dd"/> </td>
                        <td><s:property value="staffId" /></td>
                        <td><s:property value="staffTel" /></td>
                        <td><s:property value="email" /></td>
                        <td><s:property value="departmentName" /></td>
                        <td> <s:property value="address" /></td>
                        <td>
                             <s:property value="marriage" />
                        </td>
                        <td>
                        <span class="img_edit hand" title="修改" onclick="skip_amend('${status.index}','${staffId}')">
                        </span>
                        <span class="img_delete hand" title="删除" onclick="skip_delete('${status.index}','${staffId}')">
                        </span>
                        </td>
                        </s:if>
                    </tr>
         </s:iterator>
	</table>
	</form>
</div>


<div style="height:35px;">
	<div class="float_left padding5">

	</div>
	<div class="float_right padding5 paging">
		<div class="float_left padding_top4">
		<span class="paging_disabled"><a href="javascript:;">上一页</a></span>
		<span class="paging_current"><a href="javascript:;">1</a></span>
		<span><a href="javascript:;">2</a></span>
		<span><a href="javascript:;">3</a></span>
		<span><a href="javascript:;">4</a></span>
		<span><a href="javascript:;">5</a></span>
		<span>...</span>
		<span><a href="javascript:;">20</a></span>
		<span><a href="javascript:;">下一页</a></span>&nbsp;每页
		</div>
		<div class="float_left"><select autoWidth="true"><option>50</option><option>100</option><option>150</option></select></div>
		<div class="float_left padding_top4">条记录</div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
</div>

</body>
</html>